package com.joyintech.enums;

/**
 * 理财 ProdType 产品类型字段
 */
public enum ProdTypeEnum {

    SYX("0","收益型产品"),
    JZX("1","净值型产品"),
    ;

    private String code;
    private String name;

    ProdTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static ProdTypeEnum getNameByCode(String code) {
        for (ProdTypeEnum codeEnum : ProdTypeEnum.values()) {
            if (codeEnum.getCode().equals(code)) {
                return codeEnum;
            }
        }
        return null;
    }
}
